var mainWindow = Titanium.UI.createWindow({
	title:"app-name",
	color:'#fff',
	navBarHidden:true,
	exitOnClose:false,
	backgroundColor:'white'
});

// tap container
var Topview = Titanium.UI.createView({
	top:'0%',
	width:'100%',
	height:'25%',
	backgroundColor:'#6e9608'
});

var friendsTap = Titanium.UI.createView({
	width:'25%',
	height:'65%',
	top:'0%',
	left:'0%',
	backgroundColor:'#252525'
});

var placesTap = Titanium.UI.createView({
	width:'25%',
	height:'65%',
	top:'0%',
	left:'25%',
	backgroundColor:'#6e9608'
});

var profileTap = Titanium.UI.createView({
	width:'25%',
	height:'65%',
	top:'0%',
	left:'50%',
	backgroundColor:'#252525'
});

var searchTap = Titanium.UI.createView({
	width:'25%',
	height:'65%',
	top:'0%',
	left:'75%',
	backgroundColor:'#252525'
});


// icons
/*
var placesIcon = Titanium.UI.createImageView({
	//backgroundImage:'images/icons/map.png',
	left:'20%',
	width:'60%',
	top:'10%',
	height:'40%'
});

placesTap.add(placesIcon);

var friendsIcon = Titanium.UI.createImageView({
	//backgroundImage:'/images/icons/friends.png',
	left:'20%',
	width:'60%',
	top:'10%',
	height:'40%'
});

friendsTap.add(friendsIcon);

var networkIcon = Titanium.UI.createImageView({
	//backgroundImage:'images/icons/network.png',
	left:'20%',
	width:'60%',
	top:'10%',
	height:'40%'
});

networkTap.add(networkIcon);

var profileIcon = Titanium.UI.createImageView({
	//backgroundImage:'images/icons/profile.png',
	left:'20%',
	width:'60%',
	top:'10%',
	height:'40%'
});

profileTap.add(profileIcon);
*/
// labels

var friendsLabel = Titanium.UI.createLabel({
	text:"Friends",
	color:'#fff',
	top:'60%',
	left:'25%',
	font:{
		fontSize:'12%'
	}
});


var placesLabel = Titanium.UI.createLabel({
	text:"Places",
	color:'#2d2d2d',
	top:'60%',
	left:'25%',
	font:{
		fontSize:'12%'
	}	
});

var profileLabel = Titanium.UI.createLabel({
	text:"Profile",
	color:'#fff',
	top:'60%',
	left:'25%',
	font:{
		fontSize:"12%"
	}	
});

var searchLabel = Titanium.UI.createLabel({
	text:"Search",
	color:'#fff',
	top:'60%',
	left:'25%'	,
	font:{
		fontSize:'12%'
	}
});

friendsTap.add(friendsLabel);
placesTap.add(placesLabel);
profileTap.add(profileLabel);
searchTap.add(searchLabel);

var followingButton = Titanium.UI.createButton({
	backgroundImage:'images/button.png',
	top:'60%',
	left:'10%',
	width:'40%',
	height:'43%'
});

var followerButton = Titanium.UI.createButton({
	backgroundImage:'images/button.png',
	top:'60%',
	left:'50%',
	width:'40%',
	height:'43%'	
	
});

//Topview.add(followerButton);
//Topview.add(followingButton);

Topview.add(friendsTap);
Topview.add(placesTap);
Topview.add(profileTap);
Topview.add(searchTap);


mainWindow.add(Topview);

// containers
var placesContainer = Titanium.UI.createView({
	top:'25%',
	left:'0%',
	height:'100%',
	backgroundColor:'blue'
});

var friendsContainer = Titanium.UI.createView({
	top:'25%',
	left:'0%',
	height:'100%',
	backgroundColor:'red'
});

var profileContainer = Titanium.UI.createView({
	top:'25%',
	left:'0%',
	height:'100%',
	backgroundColor:'yellow'
});

var searchContainer = Titanium.UI.createView({
	top:'25%',
	left:'0%',
	height:'100%',
	backgroundColor:'black'
});

mainWindow.add(placesContainer);

Titanium.include('applicationWindowHands.js');
Titanium.include('placesView.js');

mainWindow.open();